
public class FighterGame {

	public static void main(String[] args) {
		Fighter fighter1 = new Fighter("fighter1", 100);
		Fighter fighter2 = new Fighter("fighter2", 100);

		while ((fighter1.isDestroyed() == false)
				&& (fighter2.isDestroyed() == false)) {
			fighter1.fire(fighter2);
			fighter2.fire(fighter1);
			fighter1.info();
			fighter2.info();
		}
		if (fighter1.isDestroyed() == true)
			System.out.printf("The winner is %s\n", fighter2.name);
		else
			System.out.printf("The winner is %s\n", fighter1.name);
	}

}
